package com.ruoyi.order.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.order.mapper.MyShortOrderMapper;
import com.ruoyi.order.domain.MyShortOrder;
import com.ruoyi.order.service.IMyShortOrderService;

/**
 * 订单列表Service业务层处理
 * 
 * @author zunzun
 * @date 2023-11-21
 */
@Service
public class MyShortOrderServiceImpl implements IMyShortOrderService 
{
    @Autowired
    private MyShortOrderMapper myShortOrderMapper;

    /**
     * 查询订单列表
     * 
     * @param id 订单列表主键
     * @return 订单列表
     */
    @Override
    public MyShortOrder selectMyShortOrderById(Long id)
    {
        return myShortOrderMapper.selectMyShortOrderById(id);
    }

    /**
     * 查询订单列表列表
     * 
     * @param myShortOrder 订单列表
     * @return 订单列表
     */
    @Override
    public List<MyShortOrder> selectMyShortOrderList(MyShortOrder myShortOrder)
    {
        return myShortOrderMapper.selectMyShortOrderList(myShortOrder);
    }

    /**
     * 新增订单列表
     * 
     * @param myShortOrder 订单列表
     * @return 结果
     */
    @Override
    public int insertMyShortOrder(MyShortOrder myShortOrder)
    {
        myShortOrder.setCreateTime(DateUtils.getNowDate());
        return myShortOrderMapper.insertMyShortOrder(myShortOrder);
    }

    /**
     * 修改订单列表
     * 
     * @param myShortOrder 订单列表
     * @return 结果
     */
    @Override
    public int updateMyShortOrder(MyShortOrder myShortOrder)
    {
        return myShortOrderMapper.updateMyShortOrder(myShortOrder);
    }

    /**
     * 批量删除订单列表
     * 
     * @param ids 需要删除的订单列表主键
     * @return 结果
     */
    @Override
    public int deleteMyShortOrderByIds(Long[] ids)
    {
        return myShortOrderMapper.deleteMyShortOrderByIds(ids);
    }

    /**
     * 删除订单列表信息
     * 
     * @param id 订单列表主键
     * @return 结果
     */
    @Override
    public int deleteMyShortOrderById(Long id)
    {
        return myShortOrderMapper.deleteMyShortOrderById(id);
    }
}
